package com.hdax.dm.feign.base;

import com.hdax.dm.entity.base.DmImage;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(value = "dm-base-provider")
public interface DmImageFeign {

    @PostMapping(path = "/base/getImage")
    DmImage getImage(@RequestParam("type")Long type,
                     @RequestParam("category")Long category,
                     @RequestParam("targetId")Long targetId);

    @PostMapping(path = "/base/carousel")
    List<DmImage> carousel();

    @PostMapping(path = "/base/updateImg")
    int updateImg(@RequestBody DmImage dmImage);
}
